package org.msfj.admin.api;

import org.msfj.admin.data.service.DictIndexService;
import org.msfj.admin.feign.DicIndexApi;
import org.msfj.common.model.CommonResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;
import java.util.Map;

@RestController
public class DicIndexApiImpl implements DicIndexApi {

    @Autowired
    private DictIndexService dictIndexService;

    @Override
    public CommonResult getAllDict(){
        List<Map<String, Object>> allDict = dictIndexService.getAllDict();
        return CommonResult.ok(allDict);
    }
}
